home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / utilities / editors / emacs-18.58.lha / emacs / lisp / loadup.el < prev    next >
Lisp/Scheme  |  1992-02-23  |  5KB  |  154 lines

  1. ;Load up standardly loaded Lisp files for Emacs.
  2. ;; This is loaded into a bare Emacs to make a dumpable one.
  3. ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
  4.  
  5. ;; This file is part of GNU Emacs.
  6.  
  7. ;; GNU Emacs is free software; you can redistribute it and/or modify
  8. ;; it under the terms of the GNU General Public License as published by
  9. ;; the Free Software Foundation; either version 1, or (at your option)
  10. ;; any later version.
  11.  
  12. ;; GNU Emacs is distributed in the hope that it will be useful,
  13. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ;; GNU General Public License for more details.
  16.  
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with GNU Emacs; see the file COPYING.  If not, write to
  19. ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21.  
  22. (load "subr")
  23. (garbage-collect)
  24. (load "loaddefs.el")  ;Don't get confused if someone compiled loaddefs by mistake.
  25. (garbage-collect)
  26. (if (eq system-type 'amigados)
  27.     (load "amiga-simple")
  28.   (load "simple"))
  29. (garbage-collect)
  30. (load "help")
  31. (garbage-collect)
  32. (if (eq system-type 'amigados)
  33.     (load "amiga-files")
  34.   (load "files"))
  35. (garbage-collect)
  36. (load "indent")
  37. (load "window")
  38. (load "paths.el")  ;Don't get confused if someone compiled paths by mistake.
  39. (garbage-collect)
  40. (load "startup")
  41. (load "lisp")
  42. (garbage-collect)
  43. (load "page")
  44. (load "register")
  45. (garbage-collect)
  46. (load "paragraphs")
  47. (load "lisp-mode")
  48. (garbage-collect)
  49. (load "text-mode")
  50. (load "fill")
  51. (garbage-collect)
  52. (load "c-mode")
  53. (garbage-collect)
  54. (load "isearch")
  55. (garbage-collect)
  56. (load "replace")
  57. (if (eq system-type 'vax-vms)
  58.     (progn
  59.       (garbage-collect)
  60.       (load "vmsproc")))
  61. (garbage-collect)
  62. (load "abbrev")
  63. (garbage-collect)
  64. (load "buff-menu")
  65. (if (eq system-type 'vax-vms)
  66.     (progn
  67.       (garbage-collect)
  68.       (load "vms-patch")))
  69. (if (eq system-type 'amigados)
  70.     (progn
  71.       (garbage-collect)
  72.       (load "amiga-init")))
  73.  
  74. ;If you want additional libraries to be preloaded and their
  75. ;doc strings kept in the DOC file rather than in core,
  76. ;you may load them with a "site-load.el" file.
  77. ;But you must also cause them to be scanned when the DOC file
  78. ;is generated.  For VMS, you must edit ../etc/makedoc.com.
  79. ;For other systems, you must edit ../src/ymakefile.
  80. (if (load "site-load" t)
  81.     (garbage-collect))
  82.  
  83. (load "version.el")  ;Don't get confused if someone compiled version.el by mistake.
  84.  
  85. ;; Note: all compiled Lisp files loaded above this point
  86. ;; must be among the ones parsed by make-docfile
  87. ;; to construct DOC.  Any that are not processed
  88. ;; for DOC will not have doc strings in the dumped Emacs.
  89.  
  90. (message "Finding pointers to doc strings...")
  91. (if (fboundp 'dump-emacs)
  92.     (let ((name emacs-version))
  93.       (while (string-match "[^-+_.a-zA-Z0-9]+" name)
  94.     (setq name (concat (downcase (substring name 0 (match-beginning 0)))
  95.                "-"
  96.                (substring name (match-end 0)))))
  97.       (copy-file (expand-file-name "../etc/DOC")
  98.          (concat (expand-file-name "../etc/DOC-") name)
  99.          t)
  100.       (Snarf-documentation (concat "DOC-" name)))
  101.     (Snarf-documentation "DOC"))
  102. (message "Finding pointers to doc strings...done")
  103. ;Note: You can cause additional libraries to be preloaded
  104. ;by writing a site-init.el that loads them.
  105. ;See also "site-load" above.
  106. (load "site-init" t)
  107. (garbage-collect)
  108.  
  109. (if (or (equal (nth 3 command-line-args) "dump")
  110.     (equal (nth 4 command-line-args) "dump"))
  111.     (if (eq system-type 'vax-vms)
  112.     (progn
  113.       (message "Dumping data as file temacs.dump")
  114.       (dump-emacs "temacs.dump" "temacs")
  115.       (kill-emacs))
  116.       (if (fboundp 'dump-emacs-data)
  117.       ;; Handle the IBM RS/6000, and perhaps eventually other machines.
  118.       (progn
  119.         ;; This strange nesting is so that the variable `name'
  120.         ;; is not bound when the data is dumped.
  121.         (message "Dumping data as file ../etc/EMACS-DATA")
  122.         (dump-emacs-data "../etc/EMACS-DATA")
  123.         (kill-emacs))
  124.     (let ((name (concat "emacs-" emacs-version)))
  125.       (while (string-match "[^-+_.a-zA-Z0-9]+" name)
  126.         (setq name (concat (downcase (substring name 0 (match-beginning 0)))
  127.                    "-"
  128.                    (substring name (match-end 0)))))
  129.       (message "Dumping under names xemacs and %s" name))
  130.     (condition-case ()
  131.         (delete-file "xemacs")
  132.       (file-error nil))
  133.     (dump-emacs "xemacs" "temacs")
  134.     ;; Recompute NAME now, so that it isn't set when we dump.
  135.     (let ((name (concat "emacs-" emacs-version)))
  136.       (while (string-match "[^-+_.a-zA-Z0-9]+" name)
  137.         (setq name (concat (downcase (substring name 0 (match-beginning 0)))
  138.                    "-"
  139.                    (substring name (match-end 0)))))
  140.       (add-name-to-file "xemacs" name t))
  141.     (kill-emacs))))
  142.  
  143. ;; Avoid error if user loads some more libraries now.
  144. (setq purify-flag nil)
  145. ;; Stop using malloc hunk even if not dumped!
  146. (if (eq system-type 'amigados) (setq amiga-initialized 1))
  147.  
  148. ;; For machines with CANNOT_DUMP defined in config.h,
  149. ;; this file must be loaded each time Emacs is run.
  150. ;; So run the startup code now.
  151.  
  152. (or (fboundp 'dump-emacs)
  153.     (eval top-level))
  154.